package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;
import org.jsola.core.validator.Const;
import org.jsola.hr.constant.EmpInfoRequireType;
import org.jsola.hr.constant.EmpInfoScene;

import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.EmpEducationRequireExample.E_COMPANY_ID;
import static org.jsola.hr.example.EmpEducationRequireExample.E_DEGREE_NAME;
import static org.jsola.hr.example.EmpEducationRequireExample.E_EDUCATION;
import static org.jsola.hr.example.EmpEducationRequireExample.E_END_TIME;
import static org.jsola.hr.example.EmpEducationRequireExample.E_GRA_COLLEGE;
import static org.jsola.hr.example.EmpEducationRequireExample.E_IS_FIRST_DEGREE;
import static org.jsola.hr.example.EmpEducationRequireExample.E_IS_FIRST_EDU;
import static org.jsola.hr.example.EmpEducationRequireExample.E_IS_HIGHEST_DEGREE;
import static org.jsola.hr.example.EmpEducationRequireExample.E_IS_HIGHEST_EDU;
import static org.jsola.hr.example.EmpEducationRequireExample.E_IS_LEHRAMT;
import static org.jsola.hr.example.EmpEducationRequireExample.E_MAJOR;
import static org.jsola.hr.example.EmpEducationRequireExample.E_REQUIRE_TYPE;
import static org.jsola.hr.example.EmpEducationRequireExample.E_START_TIME;
import static org.jsola.hr.example.EmpEducationRequireExample.E_TEA_METHODS;
import static org.jsola.hr.example.EmpEducationRequireExample.M_COMPANY_ID_MAX;
import static org.jsola.hr.example.EmpEducationRequireExample.M_COMPANY_ID_NOT_NULL;
import static org.jsola.hr.example.EmpEducationRequireExample.M_DEGREE_NAME_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpEducationRequireExample.M_EDUCATION_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpEducationRequireExample.M_END_TIME_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpEducationRequireExample.M_GRA_COLLEGE_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpEducationRequireExample.M_IS_FIRST_DEGREE_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpEducationRequireExample.M_IS_FIRST_EDU_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpEducationRequireExample.M_IS_HIGHEST_DEGREE_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpEducationRequireExample.M_IS_HIGHEST_EDU_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpEducationRequireExample.M_IS_LEHRAMT_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpEducationRequireExample.M_MAJOR_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpEducationRequireExample.M_REQUIRE_TYPE_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpEducationRequireExample.M_REQUIRE_TYPE_MAX;
import static org.jsola.hr.example.EmpEducationRequireExample.M_REQUIRE_TYPE_NOT_NULL;
import static org.jsola.hr.example.EmpEducationRequireExample.M_START_TIME_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpEducationRequireExample.M_TEA_METHODS_ENUM_NOT_MATCH;
import static org.jsola.hr.example.EmpEducationRequireExample.N_COMPANY_ID;
import static org.jsola.hr.example.EmpEducationRequireExample.N_DEGREE_NAME;
import static org.jsola.hr.example.EmpEducationRequireExample.N_EDUCATION;
import static org.jsola.hr.example.EmpEducationRequireExample.N_END_TIME;
import static org.jsola.hr.example.EmpEducationRequireExample.N_GRA_COLLEGE;
import static org.jsola.hr.example.EmpEducationRequireExample.N_IS_FIRST_DEGREE;
import static org.jsola.hr.example.EmpEducationRequireExample.N_IS_FIRST_EDU;
import static org.jsola.hr.example.EmpEducationRequireExample.N_IS_HIGHEST_DEGREE;
import static org.jsola.hr.example.EmpEducationRequireExample.N_IS_HIGHEST_EDU;
import static org.jsola.hr.example.EmpEducationRequireExample.N_IS_LEHRAMT;
import static org.jsola.hr.example.EmpEducationRequireExample.N_MAJOR;
import static org.jsola.hr.example.EmpEducationRequireExample.N_REQUIRE_TYPE;
import static org.jsola.hr.example.EmpEducationRequireExample.N_START_TIME;
import static org.jsola.hr.example.EmpEducationRequireExample.N_TEA_METHODS;

/**
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【公司员工教育经历所需信息】的参数")
@Data
public class EmpEducationRequireAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID, required = true)
    @NotNull(message = M_COMPANY_ID_NOT_NULL)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;

    @ApiModelProperty(notes = N_REQUIRE_TYPE, example = E_REQUIRE_TYPE, required = true, allowableValues = EmpInfoScene.VALUES_STR)
    @NotNull(message = M_REQUIRE_TYPE_NOT_NULL)
    @Length(max = 20, message = M_REQUIRE_TYPE_MAX)
    @Const(constClass = EmpInfoScene.class, message = M_REQUIRE_TYPE_ENUM_NOT_MATCH)
    private String requireType;

    @ApiModelProperty(notes = N_GRA_COLLEGE, example = E_GRA_COLLEGE, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_GRA_COLLEGE_ENUM_NOT_MATCH)
    private Integer graCollege;

    @ApiModelProperty(notes = N_IS_LEHRAMT, example = E_IS_LEHRAMT, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_IS_LEHRAMT_ENUM_NOT_MATCH)
    private Integer isLehramt;

    @ApiModelProperty(notes = N_MAJOR, example = E_MAJOR, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_MAJOR_ENUM_NOT_MATCH)
    private Integer major;

    @ApiModelProperty(notes = N_EDUCATION, example = E_EDUCATION, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_EDUCATION_ENUM_NOT_MATCH)
    private Integer education;

    @ApiModelProperty(notes = N_TEA_METHODS, example = E_TEA_METHODS, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_TEA_METHODS_ENUM_NOT_MATCH)
    private Integer teaMethods;

    @ApiModelProperty(notes = N_START_TIME, example = E_START_TIME, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_START_TIME_ENUM_NOT_MATCH)
    private Integer startTime;

    @ApiModelProperty(notes = N_END_TIME, example = E_END_TIME, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_END_TIME_ENUM_NOT_MATCH)
    private Integer endTime;

    @ApiModelProperty(notes = N_IS_FIRST_EDU, example = E_IS_FIRST_EDU, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_IS_FIRST_EDU_ENUM_NOT_MATCH)
    private Integer isFirstEdu;

    @ApiModelProperty(notes = N_IS_HIGHEST_EDU, example = E_IS_HIGHEST_EDU, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_IS_HIGHEST_EDU_ENUM_NOT_MATCH)
    private Integer isHighestEdu;

    @ApiModelProperty(notes = N_DEGREE_NAME, example = E_DEGREE_NAME, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_DEGREE_NAME_ENUM_NOT_MATCH)
    private Integer degreeName;

    @ApiModelProperty(notes = N_IS_FIRST_DEGREE, example = E_IS_FIRST_DEGREE, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_IS_FIRST_DEGREE_ENUM_NOT_MATCH)
    private Integer isFirstDegree;

    @ApiModelProperty(notes = N_IS_HIGHEST_DEGREE, example = E_IS_HIGHEST_DEGREE, allowableValues = EmpInfoRequireType.VALUES_STR)
    @Const(constClass = EmpInfoRequireType.class, message = M_IS_HIGHEST_DEGREE_ENUM_NOT_MATCH)
    private Integer isHighestDegree;


}

